package cn.edu.zafu.bigdata.x.wupeng.c;

public class Employee extends Person {
    protected String name;
    protected int age;
    protected int salary;
    protected int workYear;
    protected String department;
    protected String job;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public int getSalary() {
        return salary;
    }

    public void setSalary(int salary) {
        this.salary = salary;
    }

    public int getWorkYear() {
        return workYear;
    }

    public void setWorkYear(int workYear) {
        this.workYear = workYear;
    }

    public String getDepartment() {
        return department;
    }

    public void setDepartment(String department) {
        this.department = department;
    }

    public String getJob() {
        return job;
    }

    public void setJob(String job) {
        this.job = job;
    }

    public Employee(){
        super("Tom");
    }
    public Employee(String name) {
        super(name);
        this.name = name;
        System.out.println("Employee构造方法被执行");
    }
    public void WhoAmI(){
        System.out.println("[Employee]我是"+name+"，今年"+age+"岁");
    }
}
